package com.payment.ktb.activity.main1;

import android.os.Bundle;
import android.view.View;
import android.widget.TextView;

import com.payment.ktb.R;
import com.payment.ktb.activity.BaseActivity;
import com.payment.ktb.constants.ConstantsPay;
import com.payment.ktb.utils.SharedPreferencesUtils;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

/**
 * Created by syd on 2016/6/28.
 */
public class PaymentTypeActivity extends BaseActivity {


    @BindView(R.id.tv_paymenttype_fast_time)
    TextView tv_paymenttype_fast_time;
    @BindView(R.id.tv_paymenttype_normal_time)
    TextView tv_paymenttype_normal_time;


    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_paymenttype);
        ButterKnife.bind(this);
        initTitle("请选择收款方式");
        tv_paymenttype_normal_time.setText(SharedPreferencesUtils.getString(ConstantsPay.T1));
        tv_paymenttype_fast_time.setText(SharedPreferencesUtils.getString(ConstantsPay.T0));
    }


    @OnClick({R.id.iv_paymenttype_fast,R.id.iv_paymenttype_normal})
    public void clickEvent(View view) {


        switch (view.getId()) {


            //快捷收款
            case R.id.iv_paymenttype_fast:
                ConstantsPay.orderType = ConstantsPay.ORDERTYPET0;
                startActivity(NocardOrderCreateActivity.class);
                break;

            //普通收款
            case R.id.iv_paymenttype_normal:
                ConstantsPay.orderType = ConstantsPay.ORDERTYPET1;
                startActivity(NocardOrderCreateActivity.class);
                break;

        }

    }

}
